package com.projecy.product.config;


import org.springframework.stereotype.Repository;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * author: mao yi
 * date: 2023/3/22
 * Number:库存管理编号
 * 编号已3开头
 * 3*   +   **年**月**日**时**分**秒      +   **(随机)
 */
public class Number {

    public static Long prdouctStock(){
        return Long.valueOf(11L+new SimpleDateFormat("yyMMddHHmmss").format(new Date())+(int)(Math.random()*90 + 10));
    }

    public static Long materialStock(){
        return Long.valueOf(12L+new SimpleDateFormat("yyMMddHHmmss").format(new Date())+(int)(Math.random()*90 + 10));
    }
}
